package com.raoway.manager 
{
	import flash.display.Stage;
	/**
	 * ...
	 * @author gcxk721
	 */
	public class StageProxy 
	{
		
		public static var stage : Stage;
        public static var _isRegisted : Boolean;
        public static var _startHeight : Number;
        public static var _startWidth : Number;
        public static var _height : Number;
        public static var _width : Number;
		
		public function StageProxy() 
		{
			
		}
		
		public static function registed(value : Stage, w : Number = 1000, h : Number = 600) : void
		{
            _isRegisted = true;
            stage = value;
            _startHeight = value.stageHeight;
            _startWidth = value.stageWidth;
            _width = w;
            _height = h;
        }
		
		public static function get startHeight():Number
		{
            return _startHeight;
        }
		
        public static function get startWidth():Number
		{
            return _startWidth;
        }
		
        public static function get height():Number
		{
            return Math.max(stage.stageHeight, _startHeight);
        }
		
        public static function get width():Number
		{
            return Math.max(stage.stageWidth, _startWidth);
        }
		
        public static function stageHeight():Number
		{
            return (stage.stageHeight);
        }
		
        public static function stageWidth():Number
		{
            return (stage.stageWidth);
        }
		
        public static function leftOffset():Number
		{
            return 0;
        }
		
        public static function rightOffset():Number
		{
            return stage.stageWidth - _startWidth;
        }
		
        public static function upOffset():Number
		{
            return 0;
        }
		
        public static function downOffset():Number
		{
            return stage.stageHeight - _startHeight;
        }
		
	}

}